A 'dropfrom' event, someone took something out of our lister and dropped it
on another one, thieves!
1 when event = 'dropfrom' then
2 if qualifier = 'shift' then do
3 parse var namestr '"' namestr '"'
4 lister query handle entry '"'namestr'"' stem fileinfo.
5 if fileinfo.type > 0 then do
6 address command 'Copy >NIL: T:ArcDir.list'handle 'T:ArcDir.list'user
7 address command 'Run >NIL: <NIL: RX DOpus5:ARexx/ArcDir.dopus5 GETDIR' portname '"'arcfile'"' user arcsubdir||namestr'/'
8 end
9 end
10 else do
11 allents = namestr
12 call getall
13 otherhandle = user
14 call arcextract
15 end
Line:
1 Event is dropfrom, dragged from the ArcDir lister and dropped onto
another one.
2 Were they holding down a shift key when they dragged and dropped?
3 - 4 They were! Get the name of the entry from between the quotes.
5 Find out what type of entry it was, if it's a file the type will be
less than 0, if it's a directory it will greater than 0.
6 - 9 It was a directory, so we copy across the ArcDir archive contents
list to a new file using the handle of the 'dropped' on lister.
Then we run the ArcDir script on the other lister with the GETDIR
command, Opus' ARexx port name, the name of the archive, the handle
of the other lister and the archive sub-directory that we dropped on
that lister.
10 - 15 It was files/dirs that we dropped on to the other lister, we make
allents equal the string of filenames that was sent in the packet,
call the getall routine to separate it into individual file/dir
names, set the otherhandle to the handle of the other lister
specified in the packet and then call the arcextract routine to
extract the files/dirs.
|